import 'package:flutter/material.dart';


class MineNoLoginPage extends StatefulWidget {
  const MineNoLoginPage({Key? key}) : super(key: key);

  @override
  State<MineNoLoginPage> createState() => _MineLoginPageState();
}

class _MineLoginPageState extends State<MineNoLoginPage> {
  bool isDown = false;
  @override
  Widget build(BuildContext context) {
    return Container(
      color:Color(0xffcddeec),
      child: Stack(
        alignment: Alignment.center,
        children: [
          GestureDetector(
            onTapDown: (TapDownDetails details){
              // 按下
              setState(() {
                isDown = true;
              });
            },
            onTapCancel: (){
              // 移除
              setState(() {
                isDown = false;
              });
            },
            onTap: (){
              // 跳转到登录页
                setState(() {
                isDown = false;
                Navigator.pushNamed(context, "/loginPage");
              });

            },
            child: Hero(
              tag: "logo",
              child: Material(
                color: Colors.transparent,
                child: Container(
                  alignment: Alignment.center,
                  width: 76,
                  height: 76,
                  decoration: BoxDecoration(
                    borderRadius: BorderRadius.all(Radius.circular(43)),
                    color: Colors.redAccent,
                    boxShadow:isDown? [
                      BoxShadow(
                        offset: Offset(3, 4),
                        color: Colors.black,
                        blurRadius: 13
              
                      ),
                    ]:null,
                  ),
                  child: Text("登录",style: TextStyle(
                    fontSize:16,
                    fontWeight: FontWeight.w500,
                    color: Colors.white
                  ),),
                ),
              ),
            ),
          )
        ],
      ),
    );
    
  }
}